/*
 * 兴趣
 */
public class interesting {

	private static final String str1="hoheelllllooooooooooooooo,wwwwwooorllllld";

	private static final String str2="hello,world";

	public static void main(String[] args) {

	boolean hasSubStr=true;

	int str1Index=0;

	for (int i=0;i<str2.length();i++) {

	int c=str1.indexOf(str2.charAt(i), str1Index);

	if(c!=-1) {

	str1Index=c+1;

	}

	else {

	hasSubStr=false;

	break;

	}

	}

	System.out.println(hasSubStr);

	}
//	String[] a = new String[3];

}